package com.java.simple.study.jvm.memstruct.stack;

/**
 * @author zhoujunlin
 * @date 2021/12/11
 * @desc 演示栈内存溢出
 * java.lang.StackOverflowError
 * -Xss256k
 **/
public class Demo1_3 {

    private static int count;

    public static void main(String[] args) {
        try {
            m1();
        }catch (Throwable t){
            t.printStackTrace();
            System.out.println(count);
        }
    }


    public static void m1() {
        count++;
        m1();
    }

}
